1 module tests.png.test1; 2 import tests.png.defs; 3 import devisualization.image; 4 import std.file : read, write, remove; 5 import std.path : baseName; 6 7 void png_test1(string checkStatements)(string file, bool mustBeExact) { 8 void check(Image)(ref Image image) { 9 mixin(checkStatements); 10 } 11 12 entryTest(file); 13 testOutput(baseName(file).tempLocation); 14 15 testOutput("header check"); 16 auto headerImage = loadPNGHeaders(cast(ubyte[])read(file)); 17 check(headerImage); 18 19 // import 1 20 testOutput("import 1"); 21 auto image1 = loadPNG!RGBA16(cast(ubyte[])read(file)); 22 check(image1); 23 24 // export 25 testOutput("export"); 26 write(baseName(file).tempLocation, image1.toBytes()); 27 28 // import 2 29 testOutput("import 2"); 30 auto image2 = loadPNG!RGBA16(cast(ubyte[])read(baseName(file).tempLocation)); 31 check(image2); 32 33 // compare import1 with import2 34 testOutput("compare"); 35 foreach(x; 0 .. headerImage.IHDR.width) { 36 foreach(y; 0 .. headerImage.IHDR.height) { 37 RGBA16 p1 = image1[x, y]; 38 RGBA16 p2 = image2[x, y]; 39 40 void checkp(ushort a, ushort b) { 41 if (mustBeExact) { 42 assert(a == b); 43 } else { 44 if (a > b && a - b > 3) 45 assert(0); 46 else if (a < b && b - a > 3) 47 assert(0); 48 } 49 } 50 51 checkp(p1.r.value, p2.r.value); 52 checkp(p1.g.value, p2.g.value); 53 checkp(p1.b.value, p2.b.value); 54 checkp(p1.a.value, p2.a.value); 55 } 56 } 57 58 // cleanup 59 //baseName(file).tempLocation.remove(); 60 61 exitTest(file); 62 } 63 64 // basn0g** 65 unittest { 66 png_test1!q{ 67 assert(image.checkIDHR(32, 32, 68 PngIHDRBitDepth.BitDepth1, 69 PngIHDRColorType.Grayscale, 70 PngIHDRCompresion.DeflateInflate, 71 PngIHDRFilter.Adaptive, 72 PngIHDRInterlaceMethod.NoInterlace)); 73 74 assert(image.PLTE is null); 75 assert(image.tRNS is null); 76 77 assert(image.gAMA !is null); 78 assert(image.gAMA.value == 100_000); 79 80 assert(image.cHRM is null); 81 assert(image.sRGB is null); 82 assert(image.iCCP is null); 83 assert(image.bKGD is null); 84 assert(image.pPHs is null); 85 assert(image.sBIT is null); 86 assert(image.tIME is null); 87 assert(image.tEXt.keys.length == 0); 88 assert(image.zEXt.keys.length == 0); 89 90 assert(image.sPLT.length == 0); 91 assert(image.hIST.length == 0); 92 }("tests/png/assets/basn0g01.png", true); 93 94 png_test1!q{ 95 assert(image.checkIDHR(32, 32, 96 PngIHDRBitDepth.BitDepth2, 97 PngIHDRColorType.Grayscale, 98 PngIHDRCompresion.DeflateInflate, 99 PngIHDRFilter.Adaptive, 100 PngIHDRInterlaceMethod.NoInterlace)); 101 102 assert(image.PLTE is null); 103 assert(image.tRNS is null); 104 105 assert(image.gAMA !is null); 106 assert(image.gAMA.value == 100_000); 107 108 assert(image.cHRM is null); 109 assert(image.sRGB is null); 110 assert(image.iCCP is null); 111 assert(image.bKGD is null); 112 assert(image.pPHs is null); 113 assert(image.sBIT is null); 114 assert(image.tIME is null); 115 116 assert(image.tEXt.keys.length == 0); 117 assert(image.zEXt.keys.length == 0); 118 119 assert(image.sPLT.length == 0); 120 assert(image.hIST.length == 0); 121 }("tests/png/assets/basn0g02.png", true); 122 123 png_test1!q{ 124 assert(image.checkIDHR(32, 32, 125 PngIHDRBitDepth.BitDepth4, 126 PngIHDRColorType.Grayscale, 127 PngIHDRCompresion.DeflateInflate, 128 PngIHDRFilter.Adaptive, 129 PngIHDRInterlaceMethod.NoInterlace)); 130 131 assert(image.PLTE is null); 132 assert(image.tRNS is null); 133 134 assert(image.gAMA !is null); 135 assert(image.gAMA.value == 100_000); 136 137 assert(image.cHRM is null); 138 assert(image.sRGB is null); 139 assert(image.iCCP is null); 140 assert(image.bKGD is null); 141 assert(image.pPHs is null); 142 assert(image.sBIT is null); 143 assert(image.tIME is null); 144 145 assert(image.tEXt.keys.length == 0); 146 assert(image.zEXt.keys.length == 0); 147 148 assert(image.sPLT.length == 0); 149 assert(image.hIST.length == 0); 150 }("tests/png/assets/basn0g04.png", true); 151 152 png_test1!q{ 153 assert(image.checkIDHR(32, 32, 154 PngIHDRBitDepth.BitDepth8, 155 PngIHDRColorType.Grayscale, 156 PngIHDRCompresion.DeflateInflate, 157 PngIHDRFilter.Adaptive, 158 PngIHDRInterlaceMethod.NoInterlace)); 159 160 assert(image.PLTE is null); 161 assert(image.tRNS is null); 162 163 assert(image.gAMA !is null); 164 assert(image.gAMA.value == 100_000); 165 166 assert(image.cHRM is null); 167 assert(image.sRGB is null); 168 assert(image.iCCP is null); 169 assert(image.bKGD is null); 170 assert(image.pPHs is null); 171 assert(image.sBIT is null); 172 assert(image.tIME is null); 173 174 assert(image.tEXt.keys.length == 0); 175 assert(image.zEXt.keys.length == 0); 176 177 assert(image.sPLT.length == 0); 178 assert(image.hIST.length == 0); 179 }("tests/png/assets/basn0g08.png", true); 180 181 png_test1!q{ 182 assert(image.checkIDHR(32, 32, 183 PngIHDRBitDepth.BitDepth16, 184 PngIHDRColorType.Grayscale, 185 PngIHDRCompresion.DeflateInflate, 186 PngIHDRFilter.Adaptive, 187 PngIHDRInterlaceMethod.NoInterlace)); 188 189 assert(image.PLTE is null); 190 assert(image.tRNS is null); 191 192 assert(image.gAMA !is null); 193 assert(image.gAMA.value == 100_000); 194 195 assert(image.cHRM is null); 196 assert(image.sRGB is null); 197 assert(image.iCCP is null); 198 assert(image.bKGD is null); 199 assert(image.pPHs is null); 200 assert(image.sBIT is null); 201 assert(image.tIME is null); 202 203 assert(image.tEXt.keys.length == 0); 204 assert(image.zEXt.keys.length == 0); 205 206 assert(image.sPLT.length == 0); 207 assert(image.hIST.length == 0); 208 }("tests/png/assets/basn0g16.png", true); 209 } 210 211 // basi0g** 212 unittest { 213 png_test1!q{ 214 assert(image.checkIDHR(32, 32, 215 PngIHDRBitDepth.BitDepth1, 216 PngIHDRColorType.Grayscale, 217 PngIHDRCompresion.DeflateInflate, 218 PngIHDRFilter.Adaptive, 219 PngIHDRInterlaceMethod.Adam7)); 220 221 assert(image.PLTE is null); 222 assert(image.tRNS is null); 223 224 assert(image.gAMA !is null); 225 assert(image.gAMA.value == 100_000); 226 227 assert(image.cHRM is null); 228 assert(image.sRGB is null); 229 assert(image.iCCP is null); 230 assert(image.bKGD is null); 231 assert(image.pPHs is null); 232 assert(image.sBIT is null); 233 assert(image.tIME is null); 234 235 assert(image.tEXt.keys.length == 0); 236 assert(image.zEXt.keys.length == 0); 237 238 assert(image.sPLT.length == 0); 239 assert(image.hIST.length == 0); 240 }("tests/png/assets/basi0g01.png", true); 241 242 png_test1!q{ 243 assert(image.checkIDHR(32, 32, 244 PngIHDRBitDepth.BitDepth2, 245 PngIHDRColorType.Grayscale, 246 PngIHDRCompresion.DeflateInflate, 247 PngIHDRFilter.Adaptive, 248 PngIHDRInterlaceMethod.Adam7)); 249 250 assert(image.PLTE is null); 251 assert(image.tRNS is null); 252 253 assert(image.gAMA !is null); 254 assert(image.gAMA.value == 100_000); 255 256 assert(image.cHRM is null); 257 assert(image.sRGB is null); 258 assert(image.iCCP is null); 259 assert(image.bKGD is null); 260 assert(image.pPHs is null); 261 assert(image.sBIT is null); 262 assert(image.tIME is null); 263 264 assert(image.tEXt.keys.length == 0); 265 assert(image.zEXt.keys.length == 0); 266 267 assert(image.sPLT.length == 0); 268 assert(image.hIST.length == 0); 269 }("tests/png/assets/basi0g02.png", true); 270 271 png_test1!q{ 272 assert(image.checkIDHR(32, 32, 273 PngIHDRBitDepth.BitDepth4, 274 PngIHDRColorType.Grayscale, 275 PngIHDRCompresion.DeflateInflate, 276 PngIHDRFilter.Adaptive, 277 PngIHDRInterlaceMethod.Adam7)); 278 279 assert(image.PLTE is null); 280 assert(image.tRNS is null); 281 282 assert(image.gAMA !is null); 283 assert(image.gAMA.value == 100_000); 284 285 assert(image.cHRM is null); 286 assert(image.sRGB is null); 287 assert(image.iCCP is null); 288 assert(image.bKGD is null); 289 assert(image.pPHs is null); 290 assert(image.sBIT is null); 291 assert(image.tIME is null); 292 293 assert(image.tEXt.keys.length == 0); 294 assert(image.zEXt.keys.length == 0); 295 296 assert(image.sPLT.length == 0); 297 assert(image.hIST.length == 0); 298 }("tests/png/assets/basi0g04.png", true); 299 300 png_test1!q{ 301 assert(image.checkIDHR(32, 32, 302 PngIHDRBitDepth.BitDepth8, 303 PngIHDRColorType.Grayscale, 304 PngIHDRCompresion.DeflateInflate, 305 PngIHDRFilter.Adaptive, 306 PngIHDRInterlaceMethod.Adam7)); 307 308 assert(image.PLTE is null); 309 assert(image.tRNS is null); 310 311 assert(image.gAMA !is null); 312 assert(image.gAMA.value == 100_000); 313 314 assert(image.cHRM is null); 315 assert(image.sRGB is null); 316 assert(image.iCCP is null); 317 assert(image.bKGD is null); 318 assert(image.pPHs is null); 319 assert(image.sBIT is null); 320 assert(image.tIME is null); 321 322 assert(image.tEXt.keys.length == 0); 323 assert(image.zEXt.keys.length == 0); 324 325 assert(image.sPLT.length == 0); 326 assert(image.hIST.length == 0); 327 }("tests/png/assets/basi0g08.png", true); 328 329 png_test1!q{ 330 assert(image.checkIDHR(32, 32, 331 PngIHDRBitDepth.BitDepth16, 332 PngIHDRColorType.Grayscale, 333 PngIHDRCompresion.DeflateInflate, 334 PngIHDRFilter.Adaptive, 335 PngIHDRInterlaceMethod.Adam7)); 336 337 assert(image.PLTE is null); 338 assert(image.tRNS is null); 339 340 assert(image.gAMA !is null); 341 assert(image.gAMA.value == 100_000); 342 343 assert(image.cHRM is null); 344 assert(image.sRGB is null); 345 assert(image.iCCP is null); 346 assert(image.bKGD is null); 347 assert(image.pPHs is null); 348 assert(image.sBIT is null); 349 assert(image.tIME is null); 350 351 assert(image.tEXt.keys.length == 0); 352 assert(image.zEXt.keys.length == 0); 353 354 assert(image.sPLT.length == 0); 355 assert(image.hIST.length == 0); 356 }("tests/png/assets/basi0g16.png", true); 357 } 358 359 //filters 360 unittest { 361 png_test1!q{ 362 assert(image.checkIDHR(32, 32, 363 PngIHDRBitDepth.BitDepth8, 364 PngIHDRColorType.Grayscale, 365 PngIHDRCompresion.DeflateInflate, 366 PngIHDRFilter.Adaptive, 367 PngIHDRInterlaceMethod.NoInterlace)); 368 369 assert(image.PLTE is null); 370 assert(image.tRNS is null); 371 assert(image.gAMA is null); 372 assert(image.cHRM is null); 373 assert(image.sRGB is null); 374 assert(image.iCCP is null); 375 assert(image.bKGD is null); 376 assert(image.pPHs is null); 377 assert(image.sBIT is null); 378 assert(image.tIME is null); 379 380 assert(image.tEXt.keys.length == 0); 381 assert(image.zEXt.keys.length == 0); 382 383 assert(image.sPLT.length == 0); 384 assert(image.hIST.length == 0); 385 }("tests/png/assets/f00n0g08.png", true); 386 387 png_test1!q{ 388 assert(image.checkIDHR(32, 32, 389 PngIHDRBitDepth.BitDepth8, 390 PngIHDRColorType.ColorUsed, 391 PngIHDRCompresion.DeflateInflate, 392 PngIHDRFilter.Adaptive, 393 PngIHDRInterlaceMethod.NoInterlace)); 394 395 assert(image.PLTE is null); 396 assert(image.tRNS is null); 397 assert(image.gAMA is null); 398 assert(image.cHRM is null); 399 assert(image.sRGB is null); 400 assert(image.iCCP is null); 401 assert(image.bKGD is null); 402 assert(image.pPHs is null); 403 assert(image.sBIT is null); 404 assert(image.tIME is null); 405 406 assert(image.tEXt.keys.length == 0); 407 assert(image.zEXt.keys.length == 0); 408 409 assert(image.sPLT.length == 0); 410 assert(image.hIST.length == 0); 411 }("tests/png/assets/f00n2c08.png", true); 412 413 png_test1!q{ 414 assert(image.checkIDHR(32, 32, 415 PngIHDRBitDepth.BitDepth8, 416 PngIHDRColorType.Grayscale, 417 PngIHDRCompresion.DeflateInflate, 418 PngIHDRFilter.Adaptive, 419 PngIHDRInterlaceMethod.NoInterlace)); 420 421 assert(image.PLTE is null); 422 assert(image.tRNS is null); 423 assert(image.gAMA is null); 424 assert(image.cHRM is null); 425 assert(image.sRGB is null); 426 assert(image.iCCP is null); 427 assert(image.bKGD is null); 428 assert(image.pPHs is null); 429 assert(image.sBIT is null); 430 assert(image.tIME is null); 431 432 assert(image.tEXt.keys.length == 0); 433 assert(image.zEXt.keys.length == 0); 434 435 assert(image.sPLT.length == 0); 436 assert(image.hIST.length == 0); 437 }("tests/png/assets/f01n0g08.png", true); 438 439 png_test1!q{ 440 assert(image.checkIDHR(32, 32, 441 PngIHDRBitDepth.BitDepth8, 442 PngIHDRColorType.ColorUsed, 443 PngIHDRCompresion.DeflateInflate, 444 PngIHDRFilter.Adaptive, 445 PngIHDRInterlaceMethod.NoInterlace)); 446 447 assert(image.PLTE is null); 448 assert(image.tRNS is null); 449 assert(image.gAMA is null); 450 assert(image.cHRM is null); 451 assert(image.sRGB is null); 452 assert(image.iCCP is null); 453 assert(image.bKGD is null); 454 assert(image.pPHs is null); 455 assert(image.sBIT is null); 456 assert(image.tIME is null); 457 458 assert(image.tEXt.keys.length == 0); 459 assert(image.zEXt.keys.length == 0); 460 461 assert(image.sPLT.length == 0); 462 assert(image.hIST.length == 0); 463 }("tests/png/assets/f01n2c08.png", true); 464 465 png_test1!q{ 466 assert(image.checkIDHR(32, 32, 467 PngIHDRBitDepth.BitDepth8, 468 PngIHDRColorType.Grayscale, 469 PngIHDRCompresion.DeflateInflate, 470 PngIHDRFilter.Adaptive, 471 PngIHDRInterlaceMethod.NoInterlace)); 472 473 assert(image.PLTE is null); 474 assert(image.tRNS is null); 475 assert(image.gAMA is null); 476 assert(image.cHRM is null); 477 assert(image.sRGB is null); 478 assert(image.iCCP is null); 479 assert(image.bKGD is null); 480 assert(image.pPHs is null); 481 assert(image.sBIT is null); 482 assert(image.tIME is null); 483 484 assert(image.tEXt.keys.length == 0); 485 assert(image.zEXt.keys.length == 0); 486 487 assert(image.sPLT.length == 0); 488 assert(image.hIST.length == 0); 489 }("tests/png/assets/f02n0g08.png", true); 490 491 png_test1!q{ 492 assert(image.checkIDHR(32, 32, 493 PngIHDRBitDepth.BitDepth8, 494 PngIHDRColorType.ColorUsed, 495 PngIHDRCompresion.DeflateInflate, 496 PngIHDRFilter.Adaptive, 497 PngIHDRInterlaceMethod.NoInterlace)); 498 499 assert(image.PLTE is null); 500 assert(image.tRNS is null); 501 assert(image.gAMA is null); 502 assert(image.cHRM is null); 503 assert(image.sRGB is null); 504 assert(image.iCCP is null); 505 assert(image.bKGD is null); 506 assert(image.pPHs is null); 507 assert(image.sBIT is null); 508 assert(image.tIME is null); 509 510 assert(image.tEXt.keys.length == 0); 511 assert(image.zEXt.keys.length == 0); 512 513 assert(image.sPLT.length == 0); 514 assert(image.hIST.length == 0); 515 }("tests/png/assets/f02n2c08.png", true); 516 517 png_test1!q{ 518 assert(image.checkIDHR(32, 32, 519 PngIHDRBitDepth.BitDepth8, 520 PngIHDRColorType.Grayscale, 521 PngIHDRCompresion.DeflateInflate, 522 PngIHDRFilter.Adaptive, 523 PngIHDRInterlaceMethod.NoInterlace)); 524 525 assert(image.PLTE is null); 526 assert(image.tRNS is null); 527 assert(image.gAMA is null); 528 assert(image.cHRM is null); 529 assert(image.sRGB is null); 530 assert(image.iCCP is null); 531 assert(image.bKGD is null); 532 assert(image.pPHs is null); 533 assert(image.sBIT is null); 534 assert(image.tIME is null); 535 536 assert(image.tEXt.keys.length == 0); 537 assert(image.zEXt.keys.length == 0); 538 539 assert(image.sPLT.length == 0); 540 assert(image.hIST.length == 0); 541 }("tests/png/assets/f03n0g08.png", true); 542 543 png_test1!q{ 544 assert(image.checkIDHR(32, 32, 545 PngIHDRBitDepth.BitDepth8, 546 PngIHDRColorType.ColorUsed, 547 PngIHDRCompresion.DeflateInflate, 548 PngIHDRFilter.Adaptive, 549 PngIHDRInterlaceMethod.NoInterlace)); 550 551 assert(image.PLTE is null); 552 assert(image.tRNS is null); 553 assert(image.gAMA is null); 554 assert(image.cHRM is null); 555 assert(image.sRGB is null); 556 assert(image.iCCP is null); 557 assert(image.bKGD is null); 558 assert(image.pPHs is null); 559 assert(image.sBIT is null); 560 assert(image.tIME is null); 561 562 assert(image.tEXt.keys.length == 0); 563 assert(image.zEXt.keys.length == 0); 564 565 assert(image.sPLT.length == 0); 566 assert(image.hIST.length == 0); 567 }("tests/png/assets/f03n2c08.png", true); 568 569 png_test1!q{ 570 assert(image.checkIDHR(32, 32, 571 PngIHDRBitDepth.BitDepth8, 572 PngIHDRColorType.Grayscale, 573 PngIHDRCompresion.DeflateInflate, 574 PngIHDRFilter.Adaptive, 575 PngIHDRInterlaceMethod.NoInterlace)); 576 577 assert(image.PLTE is null); 578 assert(image.tRNS is null); 579 assert(image.gAMA is null); 580 assert(image.cHRM is null); 581 assert(image.sRGB is null); 582 assert(image.iCCP is null); 583 assert(image.bKGD is null); 584 assert(image.pPHs is null); 585 assert(image.sBIT is null); 586 assert(image.tIME is null); 587 588 assert(image.tEXt.keys.length == 0); 589 assert(image.zEXt.keys.length == 0); 590 591 assert(image.sPLT.length == 0); 592 assert(image.hIST.length == 0); 593 }("tests/png/assets/f04n0g08.png", true); 594 595 png_test1!q{ 596 assert(image.checkIDHR(32, 32, 597 PngIHDRBitDepth.BitDepth8, 598 PngIHDRColorType.ColorUsed, 599 PngIHDRCompresion.DeflateInflate, 600 PngIHDRFilter.Adaptive, 601 PngIHDRInterlaceMethod.NoInterlace)); 602 603 assert(image.PLTE is null); 604 assert(image.tRNS is null); 605 assert(image.gAMA is null); 606 assert(image.cHRM is null); 607 assert(image.sRGB is null); 608 assert(image.iCCP is null); 609 assert(image.bKGD is null); 610 assert(image.pPHs is null); 611 assert(image.sBIT is null); 612 assert(image.tIME is null); 613 614 assert(image.tEXt.keys.length == 0); 615 assert(image.zEXt.keys.length == 0); 616 617 assert(image.sPLT.length == 0); 618 assert(image.hIST.length == 0); 619 }("tests/png/assets/f04n2c08.png", true); 620 } 621 622 // s**nP** 623 unittest { 624 png_test1!q{ 625 assert(image.checkIDHR(1, 1, 626 PngIHDRBitDepth.BitDepth1, 627 PngIHDRColorType.PalletteWithColorUsed, 628 PngIHDRCompresion.DeflateInflate, 629 PngIHDRFilter.Adaptive, 630 PngIHDRInterlaceMethod.NoInterlace)); 631 632 assert(image.PLTE !is null); 633 assert(image.tRNS is null); 634 assert(image.gAMA !is null); 635 assert(image.cHRM is null); 636 assert(image.sRGB is null); 637 assert(image.iCCP is null); 638 assert(image.bKGD is null); 639 assert(image.pPHs is null); 640 assert(image.sBIT !is null); 641 assert(image.tIME is null); 642 643 assert(image.tEXt.keys.length == 0); 644 assert(image.zEXt.keys.length == 0); 645 646 assert(image.sPLT.length == 0); 647 assert(image.hIST.length == 0); 648 }("tests/png/assets/s01n3p01.png", true); 649 650 png_test1!q{ 651 assert(image.checkIDHR(2, 2, 652 PngIHDRBitDepth.BitDepth1, 653 PngIHDRColorType.PalletteWithColorUsed, 654 PngIHDRCompresion.DeflateInflate, 655 PngIHDRFilter.Adaptive, 656 PngIHDRInterlaceMethod.NoInterlace)); 657 658 assert(image.PLTE !is null); 659 assert(image.tRNS is null); 660 assert(image.gAMA !is null); 661 assert(image.cHRM is null); 662 assert(image.sRGB is null); 663 assert(image.iCCP is null); 664 assert(image.bKGD is null); 665 assert(image.pPHs is null); 666 assert(image.sBIT !is null); 667 assert(image.tIME is null); 668 669 assert(image.tEXt.keys.length == 0); 670 assert(image.zEXt.keys.length == 0); 671 672 assert(image.sPLT.length == 0); 673 assert(image.hIST.length == 0); 674 }("tests/png/assets/s02n3p01.png", true); 675 676 png_test1!q{ 677 assert(image.checkIDHR(3, 3, 678 PngIHDRBitDepth.BitDepth1, 679 PngIHDRColorType.PalletteWithColorUsed, 680 PngIHDRCompresion.DeflateInflate, 681 PngIHDRFilter.Adaptive, 682 PngIHDRInterlaceMethod.NoInterlace)); 683 684 assert(image.PLTE !is null); 685 assert(image.tRNS is null); 686 assert(image.gAMA !is null); 687 assert(image.cHRM is null); 688 assert(image.sRGB is null); 689 assert(image.iCCP is null); 690 assert(image.bKGD is null); 691 assert(image.pPHs is null); 692 assert(image.sBIT !is null); 693 assert(image.tIME is null); 694 695 assert(image.tEXt.keys.length == 0); 696 assert(image.zEXt.keys.length == 0); 697 698 assert(image.sPLT.length == 0); 699 assert(image.hIST.length == 0); 700 }("tests/png/assets/s03n3p01.png", true); 701 702 png_test1!q{ 703 assert(image.checkIDHR(4, 4, 704 PngIHDRBitDepth.BitDepth1, 705 PngIHDRColorType.PalletteWithColorUsed, 706 PngIHDRCompresion.DeflateInflate, 707 PngIHDRFilter.Adaptive, 708 PngIHDRInterlaceMethod.NoInterlace)); 709 710 assert(image.PLTE !is null); 711 assert(image.tRNS is null); 712 assert(image.gAMA !is null); 713 assert(image.cHRM is null); 714 assert(image.sRGB is null); 715 assert(image.iCCP is null); 716 assert(image.bKGD is null); 717 assert(image.pPHs is null); 718 assert(image.sBIT !is null); 719 assert(image.tIME is null); 720 721 assert(image.tEXt.keys.length == 0); 722 assert(image.zEXt.keys.length == 0); 723 724 assert(image.sPLT.length == 0); 725 assert(image.hIST.length == 0); 726 }("tests/png/assets/s04n3p01.png", true); 727 728 png_test1!q{ 729 assert(image.checkIDHR(5, 5, 730 PngIHDRBitDepth.BitDepth2, 731 PngIHDRColorType.PalletteWithColorUsed, 732 PngIHDRCompresion.DeflateInflate, 733 PngIHDRFilter.Adaptive, 734 PngIHDRInterlaceMethod.NoInterlace)); 735 736 assert(image.PLTE !is null); 737 assert(image.tRNS is null); 738 assert(image.gAMA !is null); 739 assert(image.cHRM is null); 740 assert(image.sRGB is null); 741 assert(image.iCCP is null); 742 assert(image.bKGD is null); 743 assert(image.pPHs is null); 744 assert(image.sBIT !is null); 745 assert(image.tIME is null); 746 747 assert(image.tEXt.keys.length == 0); 748 assert(image.zEXt.keys.length == 0); 749 750 assert(image.sPLT.length == 0); 751 assert(image.hIST.length == 0); 752 }("tests/png/assets/s05n3p02.png", true); 753 754 png_test1!q{ 755 assert(image.checkIDHR(6, 6, 756 PngIHDRBitDepth.BitDepth2, 757 PngIHDRColorType.PalletteWithColorUsed, 758 PngIHDRCompresion.DeflateInflate, 759 PngIHDRFilter.Adaptive, 760 PngIHDRInterlaceMethod.NoInterlace)); 761 762 assert(image.PLTE !is null); 763 assert(image.tRNS is null); 764 assert(image.gAMA !is null); 765 assert(image.cHRM is null); 766 assert(image.sRGB is null); 767 assert(image.iCCP is null); 768 assert(image.bKGD is null); 769 assert(image.pPHs is null); 770 assert(image.sBIT !is null); 771 assert(image.tIME is null); 772 773 assert(image.tEXt.keys.length == 0); 774 assert(image.zEXt.keys.length == 0); 775 776 assert(image.sPLT.length == 0); 777 assert(image.hIST.length == 0); 778 }("tests/png/assets/s06n3p02.png", true); 779 780 png_test1!q{ 781 assert(image.checkIDHR(7, 7, 782 PngIHDRBitDepth.BitDepth2, 783 PngIHDRColorType.PalletteWithColorUsed, 784 PngIHDRCompresion.DeflateInflate, 785 PngIHDRFilter.Adaptive, 786 PngIHDRInterlaceMethod.NoInterlace)); 787 788 assert(image.PLTE !is null); 789 assert(image.tRNS is null); 790 assert(image.gAMA !is null); 791 assert(image.cHRM is null); 792 assert(image.sRGB is null); 793 assert(image.iCCP is null); 794 assert(image.bKGD is null); 795 assert(image.pPHs is null); 796 assert(image.sBIT !is null); 797 assert(image.tIME is null); 798 799 assert(image.tEXt.keys.length == 0); 800 assert(image.zEXt.keys.length == 0); 801 802 assert(image.sPLT.length == 0); 803 assert(image.hIST.length == 0); 804 }("tests/png/assets/s07n3p02.png", true); 805 806 png_test1!q{ 807 assert(image.checkIDHR(8, 8, 808 PngIHDRBitDepth.BitDepth2, 809 PngIHDRColorType.PalletteWithColorUsed, 810 PngIHDRCompresion.DeflateInflate, 811 PngIHDRFilter.Adaptive, 812 PngIHDRInterlaceMethod.NoInterlace)); 813 814 assert(image.PLTE !is null); 815 assert(image.tRNS is null); 816 assert(image.gAMA !is null); 817 assert(image.cHRM is null); 818 assert(image.sRGB is null); 819 assert(image.iCCP is null); 820 assert(image.bKGD is null); 821 assert(image.pPHs is null); 822 assert(image.sBIT !is null); 823 assert(image.tIME is null); 824 825 assert(image.tEXt.keys.length == 0); 826 assert(image.zEXt.keys.length == 0); 827 828 assert(image.sPLT.length == 0); 829 assert(image.hIST.length == 0); 830 }("tests/png/assets/s08n3p02.png", true); 831 832 png_test1!q{ 833 assert(image.checkIDHR(9, 9, 834 PngIHDRBitDepth.BitDepth2, 835 PngIHDRColorType.PalletteWithColorUsed, 836 PngIHDRCompresion.DeflateInflate, 837 PngIHDRFilter.Adaptive, 838 PngIHDRInterlaceMethod.NoInterlace)); 839 840 assert(image.PLTE !is null); 841 assert(image.tRNS is null); 842 assert(image.gAMA !is null); 843 assert(image.cHRM is null); 844 assert(image.sRGB is null); 845 assert(image.iCCP is null); 846 assert(image.bKGD is null); 847 assert(image.pPHs is null); 848 assert(image.sBIT !is null); 849 assert(image.tIME is null); 850 851 assert(image.tEXt.keys.length == 0); 852 assert(image.zEXt.keys.length == 0); 853 854 assert(image.sPLT.length == 0); 855 assert(image.hIST.length == 0); 856 }("tests/png/assets/s09n3p02.png", true); 857 } 858 859 // s**iP** 860 unittest { 861 png_test1!q{ 862 assert(image.checkIDHR(1, 1, 863 PngIHDRBitDepth.BitDepth1, 864 PngIHDRColorType.PalletteWithColorUsed, 865 PngIHDRCompresion.DeflateInflate, 866 PngIHDRFilter.Adaptive, 867 PngIHDRInterlaceMethod.Adam7)); 868 869 assert(image.PLTE !is null); 870 assert(image.tRNS is null); 871 assert(image.gAMA !is null); 872 assert(image.cHRM is null); 873 assert(image.sRGB is null); 874 assert(image.iCCP is null); 875 assert(image.bKGD is null); 876 assert(image.pPHs is null); 877 assert(image.sBIT !is null); 878 assert(image.tIME is null); 879 880 assert(image.tEXt.keys.length == 0); 881 assert(image.zEXt.keys.length == 0); 882 883 assert(image.sPLT.length == 0); 884 assert(image.hIST.length == 0); 885 }("tests/png/assets/s01i3p01.png", true); 886 887 png_test1!q{ 888 assert(image.checkIDHR(2, 2, 889 PngIHDRBitDepth.BitDepth1, 890 PngIHDRColorType.PalletteWithColorUsed, 891 PngIHDRCompresion.DeflateInflate, 892 PngIHDRFilter.Adaptive, 893 PngIHDRInterlaceMethod.Adam7)); 894 895 assert(image.PLTE !is null); 896 assert(image.tRNS is null); 897 assert(image.gAMA !is null); 898 assert(image.cHRM is null); 899 assert(image.sRGB is null); 900 assert(image.iCCP is null); 901 assert(image.bKGD is null); 902 assert(image.pPHs is null); 903 assert(image.sBIT !is null); 904 assert(image.tIME is null); 905 906 assert(image.tEXt.keys.length == 0); 907 assert(image.zEXt.keys.length == 0); 908 909 assert(image.sPLT.length == 0); 910 assert(image.hIST.length == 0); 911 }("tests/png/assets/s02i3p01.png", true); 912 913 png_test1!q{ 914 assert(image.checkIDHR(3, 3, 915 PngIHDRBitDepth.BitDepth1, 916 PngIHDRColorType.PalletteWithColorUsed, 917 PngIHDRCompresion.DeflateInflate, 918 PngIHDRFilter.Adaptive, 919 PngIHDRInterlaceMethod.Adam7)); 920 921 assert(image.PLTE !is null); 922 assert(image.tRNS is null); 923 assert(image.gAMA !is null); 924 assert(image.cHRM is null); 925 assert(image.sRGB is null); 926 assert(image.iCCP is null); 927 assert(image.bKGD is null); 928 assert(image.pPHs is null); 929 assert(image.sBIT !is null); 930 assert(image.tIME is null); 931 932 assert(image.tEXt.keys.length == 0); 933 assert(image.zEXt.keys.length == 0); 934 935 assert(image.sPLT.length == 0); 936 assert(image.hIST.length == 0); 937 }("tests/png/assets/s03i3p01.png", true); 938 939 png_test1!q{ 940 assert(image.checkIDHR(4, 4, 941 PngIHDRBitDepth.BitDepth1, 942 PngIHDRColorType.PalletteWithColorUsed, 943 PngIHDRCompresion.DeflateInflate, 944 PngIHDRFilter.Adaptive, 945 PngIHDRInterlaceMethod.Adam7)); 946 947 assert(image.PLTE !is null); 948 assert(image.tRNS is null); 949 assert(image.gAMA !is null); 950 assert(image.cHRM is null); 951 assert(image.sRGB is null); 952 assert(image.iCCP is null); 953 assert(image.bKGD is null); 954 assert(image.pPHs is null); 955 assert(image.sBIT !is null); 956 assert(image.tIME is null); 957 958 assert(image.tEXt.keys.length == 0); 959 assert(image.zEXt.keys.length == 0); 960 961 assert(image.sPLT.length == 0); 962 assert(image.hIST.length == 0); 963 }("tests/png/assets/s04i3p01.png", true); 964 965 png_test1!q{ 966 assert(image.checkIDHR(5, 5, 967 PngIHDRBitDepth.BitDepth2, 968 PngIHDRColorType.PalletteWithColorUsed, 969 PngIHDRCompresion.DeflateInflate, 970 PngIHDRFilter.Adaptive, 971 PngIHDRInterlaceMethod.Adam7)); 972 973 assert(image.PLTE !is null); 974 assert(image.tRNS is null); 975 assert(image.gAMA !is null); 976 assert(image.cHRM is null); 977 assert(image.sRGB is null); 978 assert(image.iCCP is null); 979 assert(image.bKGD is null); 980 assert(image.pPHs is null); 981 assert(image.sBIT !is null); 982 assert(image.tIME is null); 983 984 assert(image.tEXt.keys.length == 0); 985 assert(image.zEXt.keys.length == 0); 986 987 assert(image.sPLT.length == 0); 988 assert(image.hIST.length == 0); 989 }("tests/png/assets/s05i3p02.png", true); 990 991 png_test1!q{ 992 assert(image.checkIDHR(6, 6, 993 PngIHDRBitDepth.BitDepth2, 994 PngIHDRColorType.PalletteWithColorUsed, 995 PngIHDRCompresion.DeflateInflate, 996 PngIHDRFilter.Adaptive, 997 PngIHDRInterlaceMethod.Adam7)); 998 999 assert(image.PLTE !is null); 1000 assert(image.tRNS is null); 1001 assert(image.gAMA !is null); 1002 assert(image.cHRM is null); 1003 assert(image.sRGB is null); 1004 assert(image.iCCP is null); 1005 assert(image.bKGD is null); 1006 assert(image.pPHs is null); 1007 assert(image.sBIT !is null); 1008 assert(image.tIME is null); 1009 1010 assert(image.tEXt.keys.length == 0); 1011 assert(image.zEXt.keys.length == 0); 1012 1013 assert(image.sPLT.length == 0); 1014 assert(image.hIST.length == 0); 1015 }("tests/png/assets/s06i3p02.png", true); 1016 1017 png_test1!q{ 1018 assert(image.checkIDHR(7, 7, 1019 PngIHDRBitDepth.BitDepth2, 1020 PngIHDRColorType.PalletteWithColorUsed, 1021 PngIHDRCompresion.DeflateInflate, 1022 PngIHDRFilter.Adaptive, 1023 PngIHDRInterlaceMethod.Adam7)); 1024 1025 assert(image.PLTE !is null); 1026 assert(image.tRNS is null); 1027 assert(image.gAMA !is null); 1028 assert(image.cHRM is null); 1029 assert(image.sRGB is null); 1030 assert(image.iCCP is null); 1031 assert(image.bKGD is null); 1032 assert(image.pPHs is null); 1033 assert(image.sBIT !is null); 1034 assert(image.tIME is null); 1035 1036 assert(image.tEXt.keys.length == 0); 1037 assert(image.zEXt.keys.length == 0); 1038 1039 assert(image.sPLT.length == 0); 1040 assert(image.hIST.length == 0); 1041 }("tests/png/assets/s07i3p02.png", true); 1042 1043 png_test1!q{ 1044 assert(image.checkIDHR(8, 8, 1045 PngIHDRBitDepth.BitDepth2, 1046 PngIHDRColorType.PalletteWithColorUsed, 1047 PngIHDRCompresion.DeflateInflate, 1048 PngIHDRFilter.Adaptive, 1049 PngIHDRInterlaceMethod.Adam7)); 1050 1051 assert(image.PLTE !is null); 1052 assert(image.tRNS is null); 1053 assert(image.gAMA !is null); 1054 assert(image.cHRM is null); 1055 assert(image.sRGB is null); 1056 assert(image.iCCP is null); 1057 assert(image.bKGD is null); 1058 assert(image.pPHs is null); 1059 assert(image.sBIT !is null); 1060 assert(image.tIME is null); 1061 1062 assert(image.tEXt.keys.length == 0); 1063 assert(image.zEXt.keys.length == 0); 1064 1065 assert(image.sPLT.length == 0); 1066 assert(image.hIST.length == 0); 1067 }("tests/png/assets/s08i3p02.png", true); 1068 1069 png_test1!q{ 1070 assert(image.checkIDHR(9, 9, 1071 PngIHDRBitDepth.BitDepth2, 1072 PngIHDRColorType.PalletteWithColorUsed, 1073 PngIHDRCompresion.DeflateInflate, 1074 PngIHDRFilter.Adaptive, 1075 PngIHDRInterlaceMethod.Adam7)); 1076 1077 assert(image.PLTE !is null); 1078 assert(image.tRNS is null); 1079 assert(image.gAMA !is null); 1080 assert(image.cHRM is null); 1081 assert(image.sRGB is null); 1082 assert(image.iCCP is null); 1083 assert(image.bKGD is null); 1084 assert(image.pPHs is null); 1085 assert(image.sBIT !is null); 1086 assert(image.tIME is null); 1087 1088 assert(image.tEXt.keys.length == 0); 1089 assert(image.zEXt.keys.length == 0); 1090 1091 assert(image.sPLT.length == 0); 1092 assert(image.hIST.length == 0); 1093 }("tests/png/assets/s09i3p02.png", true); 1094 } 1095 1096 // s**i*p0* 1097 unittest { 1098 png_test1!q{ 1099 assert(image.checkIDHR(32, 32, 1100 PngIHDRBitDepth.BitDepth4, 1101 PngIHDRColorType.PalletteWithColorUsed, 1102 PngIHDRCompresion.DeflateInflate, 1103 PngIHDRFilter.Adaptive, 1104 PngIHDRInterlaceMethod.Adam7)); 1105 1106 assert(image.PLTE !is null); 1107 assert(image.tRNS is null); 1108 assert(image.gAMA !is null); 1109 assert(image.cHRM is null); 1110 assert(image.sRGB is null); 1111 assert(image.iCCP is null); 1112 assert(image.bKGD is null); 1113 assert(image.pPHs is null); 1114 assert(image.sBIT !is null); 1115 assert(image.tIME is null); 1116 1117 assert(image.tEXt.keys.length == 0); 1118 assert(image.zEXt.keys.length == 0); 1119 1120 assert(image.sPLT.length == 0); 1121 assert(image.hIST.length == 0); 1122 }("tests/png/assets/s32i3p04.png", true); 1123 1124 png_test1!q{ 1125 assert(image.checkIDHR(33, 33, 1126 PngIHDRBitDepth.BitDepth4, 1127 PngIHDRColorType.PalletteWithColorUsed, 1128 PngIHDRCompresion.DeflateInflate, 1129 PngIHDRFilter.Adaptive, 1130 PngIHDRInterlaceMethod.Adam7)); 1131 1132 assert(image.PLTE !is null); 1133 assert(image.tRNS is null); 1134 assert(image.gAMA !is null); 1135 assert(image.cHRM is null); 1136 assert(image.sRGB is null); 1137 assert(image.iCCP is null); 1138 assert(image.bKGD is null); 1139 assert(image.pPHs is null); 1140 assert(image.sBIT !is null); 1141 assert(image.tIME is null); 1142 1143 assert(image.tEXt.keys.length == 0); 1144 assert(image.zEXt.keys.length == 0); 1145 1146 assert(image.sPLT.length == 0); 1147 assert(image.hIST.length == 0); 1148 }("tests/png/assets/s33i3p04.png", true); 1149 1150 png_test1!q{ 1151 assert(image.checkIDHR(34, 34, 1152 PngIHDRBitDepth.BitDepth4, 1153 PngIHDRColorType.PalletteWithColorUsed, 1154 PngIHDRCompresion.DeflateInflate, 1155 PngIHDRFilter.Adaptive, 1156 PngIHDRInterlaceMethod.Adam7)); 1157 1158 assert(image.PLTE !is null); 1159 assert(image.tRNS is null); 1160 assert(image.gAMA !is null); 1161 assert(image.cHRM is null); 1162 assert(image.sRGB is null); 1163 assert(image.iCCP is null); 1164 assert(image.bKGD is null); 1165 assert(image.pPHs is null); 1166 assert(image.sBIT !is null); 1167 assert(image.tIME is null); 1168 1169 assert(image.tEXt.keys.length == 0); 1170 assert(image.zEXt.keys.length == 0); 1171 1172 assert(image.sPLT.length == 0); 1173 assert(image.hIST.length == 0); 1174 }("tests/png/assets/s34i3p04.png", true); 1175 1176 png_test1!q{ 1177 assert(image.checkIDHR(35, 35, 1178 PngIHDRBitDepth.BitDepth4, 1179 PngIHDRColorType.PalletteWithColorUsed, 1180 PngIHDRCompresion.DeflateInflate, 1181 PngIHDRFilter.Adaptive, 1182 PngIHDRInterlaceMethod.Adam7)); 1183 1184 assert(image.PLTE !is null); 1185 assert(image.tRNS is null); 1186 assert(image.gAMA !is null); 1187 assert(image.cHRM is null); 1188 assert(image.sRGB is null); 1189 assert(image.iCCP is null); 1190 assert(image.bKGD is null); 1191 assert(image.pPHs is null); 1192 assert(image.sBIT !is null); 1193 assert(image.tIME is null); 1194 1195 assert(image.tEXt.keys.length == 0); 1196 assert(image.zEXt.keys.length == 0); 1197 1198 assert(image.sPLT.length == 0); 1199 assert(image.hIST.length == 0); 1200 }("tests/png/assets/s35i3p04.png", true); 1201 1202 png_test1!q{ 1203 assert(image.checkIDHR(36, 36, 1204 PngIHDRBitDepth.BitDepth4, 1205 PngIHDRColorType.PalletteWithColorUsed, 1206 PngIHDRCompresion.DeflateInflate, 1207 PngIHDRFilter.Adaptive, 1208 PngIHDRInterlaceMethod.Adam7)); 1209 1210 assert(image.PLTE !is null); 1211 assert(image.tRNS is null); 1212 assert(image.gAMA !is null); 1213 assert(image.cHRM is null); 1214 assert(image.sRGB is null); 1215 assert(image.iCCP is null); 1216 assert(image.bKGD is null); 1217 assert(image.pPHs is null); 1218 assert(image.sBIT !is null); 1219 assert(image.tIME is null); 1220 1221 assert(image.tEXt.keys.length == 0); 1222 assert(image.zEXt.keys.length == 0); 1223 1224 assert(image.sPLT.length == 0); 1225 assert(image.hIST.length == 0); 1226 }("tests/png/assets/s36i3p04.png", true); 1227 1228 png_test1!q{ 1229 assert(image.checkIDHR(37, 37, 1230 PngIHDRBitDepth.BitDepth4, 1231 PngIHDRColorType.PalletteWithColorUsed, 1232 PngIHDRCompresion.DeflateInflate, 1233 PngIHDRFilter.Adaptive, 1234 PngIHDRInterlaceMethod.Adam7)); 1235 1236 assert(image.PLTE !is null); 1237 assert(image.tRNS is null); 1238 assert(image.gAMA !is null); 1239 assert(image.cHRM is null); 1240 assert(image.sRGB is null); 1241 assert(image.iCCP is null); 1242 assert(image.bKGD is null); 1243 assert(image.pPHs is null); 1244 assert(image.sBIT !is null); 1245 assert(image.tIME is null); 1246 1247 assert(image.tEXt.keys.length == 0); 1248 assert(image.zEXt.keys.length == 0); 1249 1250 assert(image.sPLT.length == 0); 1251 assert(image.hIST.length == 0); 1252 }("tests/png/assets/s37i3p04.png", true); 1253 1254 png_test1!q{ 1255 assert(image.checkIDHR(38, 38, 1256 PngIHDRBitDepth.BitDepth4, 1257 PngIHDRColorType.PalletteWithColorUsed, 1258 PngIHDRCompresion.DeflateInflate, 1259 PngIHDRFilter.Adaptive, 1260 PngIHDRInterlaceMethod.Adam7)); 1261 1262 assert(image.PLTE !is null); 1263 assert(image.tRNS is null); 1264 assert(image.gAMA !is null); 1265 assert(image.cHRM is null); 1266 assert(image.sRGB is null); 1267 assert(image.iCCP is null); 1268 assert(image.bKGD is null); 1269 assert(image.pPHs is null); 1270 assert(image.sBIT !is null); 1271 assert(image.tIME is null); 1272 1273 assert(image.tEXt.keys.length == 0); 1274 assert(image.zEXt.keys.length == 0); 1275 1276 assert(image.sPLT.length == 0); 1277 assert(image.hIST.length == 0); 1278 }("tests/png/assets/s38i3p04.png", true); 1279 1280 png_test1!q{ 1281 assert(image.checkIDHR(39, 39, 1282 PngIHDRBitDepth.BitDepth4, 1283 PngIHDRColorType.PalletteWithColorUsed, 1284 PngIHDRCompresion.DeflateInflate, 1285 PngIHDRFilter.Adaptive, 1286 PngIHDRInterlaceMethod.Adam7)); 1287 1288 assert(image.PLTE !is null); 1289 assert(image.tRNS is null); 1290 assert(image.gAMA !is null); 1291 assert(image.cHRM is null); 1292 assert(image.sRGB is null); 1293 assert(image.iCCP is null); 1294 assert(image.bKGD is null); 1295 assert(image.pPHs is null); 1296 assert(image.sBIT !is null); 1297 assert(image.tIME is null); 1298 1299 assert(image.tEXt.keys.length == 0); 1300 assert(image.zEXt.keys.length == 0); 1301 1302 assert(image.sPLT.length == 0); 1303 assert(image.hIST.length == 0); 1304 }("tests/png/assets/s39i3p04.png", true); 1305 1306 png_test1!q{ 1307 assert(image.checkIDHR(40, 40, 1308 PngIHDRBitDepth.BitDepth4, 1309 PngIHDRColorType.PalletteWithColorUsed, 1310 PngIHDRCompresion.DeflateInflate, 1311 PngIHDRFilter.Adaptive, 1312 PngIHDRInterlaceMethod.Adam7)); 1313 1314 assert(image.PLTE !is null); 1315 assert(image.tRNS is null); 1316 assert(image.gAMA !is null); 1317 assert(image.cHRM is null); 1318 assert(image.sRGB is null); 1319 assert(image.iCCP is null); 1320 assert(image.bKGD is null); 1321 assert(image.pPHs is null); 1322 assert(image.sBIT !is null); 1323 assert(image.tIME is null); 1324 1325 assert(image.tEXt.keys.length == 0); 1326 assert(image.zEXt.keys.length == 0); 1327 1328 assert(image.sPLT.length == 0); 1329 assert(image.hIST.length == 0); 1330 }("tests/png/assets/s40i3p04.png", true); 1331 } 1332 1333 // s**n*p0* 1334 unittest { 1335 png_test1!q{ 1336 assert(image.checkIDHR(32, 32, 1337 PngIHDRBitDepth.BitDepth4, 1338 PngIHDRColorType.PalletteWithColorUsed, 1339 PngIHDRCompresion.DeflateInflate, 1340 PngIHDRFilter.Adaptive, 1341 PngIHDRInterlaceMethod.NoInterlace)); 1342 1343 assert(image.PLTE !is null); 1344 assert(image.tRNS is null); 1345 assert(image.gAMA !is null); 1346 assert(image.cHRM is null); 1347 assert(image.sRGB is null); 1348 assert(image.iCCP is null); 1349 assert(image.bKGD is null); 1350 assert(image.pPHs is null); 1351 assert(image.sBIT !is null); 1352 assert(image.tIME is null); 1353 1354 assert(image.tEXt.keys.length == 0); 1355 assert(image.zEXt.keys.length == 0); 1356 1357 assert(image.sPLT.length == 0); 1358 assert(image.hIST.length == 0); 1359 }("tests/png/assets/s32n3p04.png", true); 1360 1361 png_test1!q{ 1362 assert(image.checkIDHR(33, 33, 1363 PngIHDRBitDepth.BitDepth4, 1364 PngIHDRColorType.PalletteWithColorUsed, 1365 PngIHDRCompresion.DeflateInflate, 1366 PngIHDRFilter.Adaptive, 1367 PngIHDRInterlaceMethod.NoInterlace)); 1368 1369 assert(image.PLTE !is null); 1370 assert(image.tRNS is null); 1371 assert(image.gAMA !is null); 1372 assert(image.cHRM is null); 1373 assert(image.sRGB is null); 1374 assert(image.iCCP is null); 1375 assert(image.bKGD is null); 1376 assert(image.pPHs is null); 1377 assert(image.sBIT !is null); 1378 assert(image.tIME is null); 1379 1380 assert(image.tEXt.keys.length == 0); 1381 assert(image.zEXt.keys.length == 0); 1382 1383 assert(image.sPLT.length == 0); 1384 assert(image.hIST.length == 0); 1385 }("tests/png/assets/s33n3p04.png", true); 1386 1387 png_test1!q{ 1388 assert(image.checkIDHR(34, 34, 1389 PngIHDRBitDepth.BitDepth4, 1390 PngIHDRColorType.PalletteWithColorUsed, 1391 PngIHDRCompresion.DeflateInflate, 1392 PngIHDRFilter.Adaptive, 1393 PngIHDRInterlaceMethod.NoInterlace)); 1394 1395 assert(image.PLTE !is null); 1396 assert(image.tRNS is null); 1397 assert(image.gAMA !is null); 1398 assert(image.cHRM is null); 1399 assert(image.sRGB is null); 1400 assert(image.iCCP is null); 1401 assert(image.bKGD is null); 1402 assert(image.pPHs is null); 1403 assert(image.sBIT !is null); 1404 assert(image.tIME is null); 1405 1406 assert(image.tEXt.keys.length == 0); 1407 assert(image.zEXt.keys.length == 0); 1408 1409 assert(image.sPLT.length == 0); 1410 assert(image.hIST.length == 0); 1411 }("tests/png/assets/s34n3p04.png", true); 1412 1413 png_test1!q{ 1414 assert(image.checkIDHR(35, 35, 1415 PngIHDRBitDepth.BitDepth4, 1416 PngIHDRColorType.PalletteWithColorUsed, 1417 PngIHDRCompresion.DeflateInflate, 1418 PngIHDRFilter.Adaptive, 1419 PngIHDRInterlaceMethod.NoInterlace)); 1420 1421 assert(image.PLTE !is null); 1422 assert(image.tRNS is null); 1423 assert(image.gAMA !is null); 1424 assert(image.cHRM is null); 1425 assert(image.sRGB is null); 1426 assert(image.iCCP is null); 1427 assert(image.bKGD is null); 1428 assert(image.pPHs is null); 1429 assert(image.sBIT !is null); 1430 assert(image.tIME is null); 1431 1432 assert(image.tEXt.keys.length == 0); 1433 assert(image.zEXt.keys.length == 0); 1434 1435 assert(image.sPLT.length == 0); 1436 assert(image.hIST.length == 0); 1437 }("tests/png/assets/s35n3p04.png", true); 1438 1439 png_test1!q{ 1440 assert(image.checkIDHR(36, 36, 1441 PngIHDRBitDepth.BitDepth4, 1442 PngIHDRColorType.PalletteWithColorUsed, 1443 PngIHDRCompresion.DeflateInflate, 1444 PngIHDRFilter.Adaptive, 1445 PngIHDRInterlaceMethod.NoInterlace)); 1446 1447 assert(image.PLTE !is null); 1448 assert(image.tRNS is null); 1449 assert(image.gAMA !is null); 1450 assert(image.cHRM is null); 1451 assert(image.sRGB is null); 1452 assert(image.iCCP is null); 1453 assert(image.bKGD is null); 1454 assert(image.pPHs is null); 1455 assert(image.sBIT !is null); 1456 assert(image.tIME is null); 1457 1458 assert(image.tEXt.keys.length == 0); 1459 assert(image.zEXt.keys.length == 0); 1460 1461 assert(image.sPLT.length == 0); 1462 assert(image.hIST.length == 0); 1463 }("tests/png/assets/s36n3p04.png", true); 1464 1465 png_test1!q{ 1466 assert(image.checkIDHR(37, 37, 1467 PngIHDRBitDepth.BitDepth4, 1468 PngIHDRColorType.PalletteWithColorUsed, 1469 PngIHDRCompresion.DeflateInflate, 1470 PngIHDRFilter.Adaptive, 1471 PngIHDRInterlaceMethod.NoInterlace)); 1472 1473 assert(image.PLTE !is null); 1474 assert(image.tRNS is null); 1475 assert(image.gAMA !is null); 1476 assert(image.cHRM is null); 1477 assert(image.sRGB is null); 1478 assert(image.iCCP is null); 1479 assert(image.bKGD is null); 1480 assert(image.pPHs is null); 1481 assert(image.sBIT !is null); 1482 assert(image.tIME is null); 1483 1484 assert(image.tEXt.keys.length == 0); 1485 assert(image.zEXt.keys.length == 0); 1486 1487 assert(image.sPLT.length == 0); 1488 assert(image.hIST.length == 0); 1489 }("tests/png/assets/s37n3p04.png", true); 1490 1491 png_test1!q{ 1492 assert(image.checkIDHR(38, 38, 1493 PngIHDRBitDepth.BitDepth4, 1494 PngIHDRColorType.PalletteWithColorUsed, 1495 PngIHDRCompresion.DeflateInflate, 1496 PngIHDRFilter.Adaptive, 1497 PngIHDRInterlaceMethod.NoInterlace)); 1498 1499 assert(image.PLTE !is null); 1500 assert(image.tRNS is null); 1501 assert(image.gAMA !is null); 1502 assert(image.cHRM is null); 1503 assert(image.sRGB is null); 1504 assert(image.iCCP is null); 1505 assert(image.bKGD is null); 1506 assert(image.pPHs is null); 1507 assert(image.sBIT !is null); 1508 assert(image.tIME is null); 1509 1510 assert(image.tEXt.keys.length == 0); 1511 assert(image.zEXt.keys.length == 0); 1512 1513 assert(image.sPLT.length == 0); 1514 assert(image.hIST.length == 0); 1515 }("tests/png/assets/s38n3p04.png", true); 1516 1517 png_test1!q{ 1518 assert(image.checkIDHR(39, 39, 1519 PngIHDRBitDepth.BitDepth4, 1520 PngIHDRColorType.PalletteWithColorUsed, 1521 PngIHDRCompresion.DeflateInflate, 1522 PngIHDRFilter.Adaptive, 1523 PngIHDRInterlaceMethod.NoInterlace)); 1524 1525 assert(image.PLTE !is null); 1526 assert(image.tRNS is null); 1527 assert(image.gAMA !is null); 1528 assert(image.cHRM is null); 1529 assert(image.sRGB is null); 1530 assert(image.iCCP is null); 1531 assert(image.bKGD is null); 1532 assert(image.pPHs is null); 1533 assert(image.sBIT !is null); 1534 assert(image.tIME is null); 1535 1536 assert(image.tEXt.keys.length == 0); 1537 assert(image.zEXt.keys.length == 0); 1538 1539 assert(image.sPLT.length == 0); 1540 assert(image.hIST.length == 0); 1541 }("tests/png/assets/s39n3p04.png", true); 1542 1543 png_test1!q{ 1544 assert(image.checkIDHR(40, 40, 1545 PngIHDRBitDepth.BitDepth4, 1546 PngIHDRColorType.PalletteWithColorUsed, 1547 PngIHDRCompresion.DeflateInflate, 1548 PngIHDRFilter.Adaptive, 1549 PngIHDRInterlaceMethod.NoInterlace)); 1550 1551 assert(image.PLTE !is null); 1552 assert(image.tRNS is null); 1553 assert(image.gAMA !is null); 1554 assert(image.cHRM is null); 1555 assert(image.sRGB is null); 1556 assert(image.iCCP is null); 1557 assert(image.bKGD is null); 1558 assert(image.pPHs is null); 1559 assert(image.sBIT !is null); 1560 assert(image.tIME is null); 1561 1562 assert(image.tEXt.keys.length == 0); 1563 assert(image.zEXt.keys.length == 0); 1564 1565 assert(image.sPLT.length == 0); 1566 assert(image.hIST.length == 0); 1567 }("tests/png/assets/s40n3p04.png", true); 1568 } 1569 1570 // basi*c** 1571 unittest { 1572 png_test1!q{ 1573 assert(image.checkIDHR(32, 32, 1574 PngIHDRBitDepth.BitDepth8, 1575 PngIHDRColorType.ColorUsed, 1576 PngIHDRCompresion.DeflateInflate, 1577 PngIHDRFilter.Adaptive, 1578 PngIHDRInterlaceMethod.Adam7)); 1579 1580 assert(image.PLTE is null); 1581 assert(image.tRNS is null); 1582 assert(image.gAMA !is null); 1583 assert(image.cHRM is null); 1584 assert(image.sRGB is null); 1585 assert(image.iCCP is null); 1586 assert(image.bKGD is null); 1587 assert(image.pPHs is null); 1588 assert(image.sBIT is null); 1589 assert(image.tIME is null); 1590 1591 assert(image.tEXt.keys.length == 0); 1592 assert(image.zEXt.keys.length == 0); 1593 1594 assert(image.sPLT.length == 0); 1595 assert(image.hIST.length == 0); 1596 }("tests/png/assets/basi2c08.png", true); 1597 1598 png_test1!q{ 1599 assert(image.checkIDHR(32, 32, 1600 PngIHDRBitDepth.BitDepth16, 1601 PngIHDRColorType.ColorUsed, 1602 PngIHDRCompresion.DeflateInflate, 1603 PngIHDRFilter.Adaptive, 1604 PngIHDRInterlaceMethod.Adam7)); 1605 1606 assert(image.PLTE is null); 1607 assert(image.tRNS is null); 1608 assert(image.gAMA !is null); 1609 assert(image.cHRM is null); 1610 assert(image.sRGB is null); 1611 assert(image.iCCP is null); 1612 assert(image.bKGD is null); 1613 assert(image.pPHs is null); 1614 assert(image.sBIT is null); 1615 assert(image.tIME is null); 1616 1617 assert(image.tEXt.keys.length == 0); 1618 assert(image.zEXt.keys.length == 0); 1619 1620 assert(image.sPLT.length == 0); 1621 assert(image.hIST.length == 0); 1622 }("tests/png/assets/basi2c16.png", true); 1623 1624 png_test1!q{ 1625 assert(image.checkIDHR(32, 32, 1626 PngIHDRBitDepth.BitDepth1, 1627 PngIHDRColorType.PalletteWithColorUsed, 1628 PngIHDRCompresion.DeflateInflate, 1629 PngIHDRFilter.Adaptive, 1630 PngIHDRInterlaceMethod.Adam7)); 1631 1632 assert(image.PLTE !is null); 1633 assert(image.tRNS is null); 1634 assert(image.gAMA !is null); 1635 assert(image.cHRM is null); 1636 assert(image.sRGB is null); 1637 assert(image.iCCP is null); 1638 assert(image.bKGD is null); 1639 assert(image.pPHs is null); 1640 assert(image.sBIT is null); 1641 assert(image.tIME is null); 1642 1643 assert(image.tEXt.keys.length == 0); 1644 assert(image.zEXt.keys.length == 0); 1645 1646 assert(image.sPLT.length == 0); 1647 assert(image.hIST.length == 0); 1648 }("tests/png/assets/basi3p01.png", true); 1649 1650 png_test1!q{ 1651 assert(image.checkIDHR(32, 32, 1652 PngIHDRBitDepth.BitDepth2, 1653 PngIHDRColorType.PalletteWithColorUsed, 1654 PngIHDRCompresion.DeflateInflate, 1655 PngIHDRFilter.Adaptive, 1656 PngIHDRInterlaceMethod.Adam7)); 1657 1658 assert(image.PLTE !is null); 1659 assert(image.tRNS is null); 1660 assert(image.gAMA !is null); 1661 assert(image.cHRM is null); 1662 assert(image.sRGB is null); 1663 assert(image.iCCP is null); 1664 assert(image.bKGD is null); 1665 assert(image.pPHs is null); 1666 assert(image.sBIT !is null); 1667 assert(image.tIME is null); 1668 1669 assert(image.tEXt.keys.length == 0); 1670 assert(image.zEXt.keys.length == 0); 1671 1672 assert(image.sPLT.length == 0); 1673 assert(image.hIST.length == 0); 1674 }("tests/png/assets/basi3p02.png", true); 1675 1676 png_test1!q{ 1677 assert(image.checkIDHR(32, 32, 1678 PngIHDRBitDepth.BitDepth4, 1679 PngIHDRColorType.PalletteWithColorUsed, 1680 PngIHDRCompresion.DeflateInflate, 1681 PngIHDRFilter.Adaptive, 1682 PngIHDRInterlaceMethod.Adam7)); 1683 1684 assert(image.PLTE !is null); 1685 assert(image.tRNS is null); 1686 assert(image.gAMA !is null); 1687 assert(image.cHRM is null); 1688 assert(image.sRGB is null); 1689 assert(image.iCCP is null); 1690 assert(image.bKGD is null); 1691 assert(image.pPHs is null); 1692 assert(image.sBIT !is null); 1693 assert(image.tIME is null); 1694 1695 assert(image.tEXt.keys.length == 0); 1696 assert(image.zEXt.keys.length == 0); 1697 1698 assert(image.sPLT.length == 0); 1699 assert(image.hIST.length == 0); 1700 }("tests/png/assets/basi3p04.png", true); 1701 1702 png_test1!q{ 1703 assert(image.checkIDHR(32, 32, 1704 PngIHDRBitDepth.BitDepth8, 1705 PngIHDRColorType.PalletteWithColorUsed, 1706 PngIHDRCompresion.DeflateInflate, 1707 PngIHDRFilter.Adaptive, 1708 PngIHDRInterlaceMethod.Adam7)); 1709 1710 assert(image.PLTE !is null); 1711 assert(image.tRNS is null); 1712 assert(image.gAMA !is null); 1713 assert(image.cHRM is null); 1714 assert(image.sRGB is null); 1715 assert(image.iCCP is null); 1716 assert(image.bKGD is null); 1717 assert(image.pPHs is null); 1718 assert(image.sBIT is null); 1719 assert(image.tIME is null); 1720 1721 assert(image.tEXt.keys.length == 0); 1722 assert(image.zEXt.keys.length == 0); 1723 1724 assert(image.sPLT.length == 0); 1725 assert(image.hIST.length == 0); 1726 }("tests/png/assets/basi3p08.png", true); 1727 } 1728 1729 // basn*c** 1730 unittest { 1731 png_test1!q{ 1732 assert(image.checkIDHR(32, 32, 1733 PngIHDRBitDepth.BitDepth8, 1734 PngIHDRColorType.ColorUsed, 1735 PngIHDRCompresion.DeflateInflate, 1736 PngIHDRFilter.Adaptive, 1737 PngIHDRInterlaceMethod.NoInterlace)); 1738 1739 assert(image.PLTE is null); 1740 assert(image.tRNS is null); 1741 assert(image.gAMA !is null); 1742 assert(image.cHRM is null); 1743 assert(image.sRGB is null); 1744 assert(image.iCCP is null); 1745 assert(image.bKGD is null); 1746 assert(image.pPHs is null); 1747 assert(image.sBIT is null); 1748 assert(image.tIME is null); 1749 1750 assert(image.tEXt.keys.length == 0); 1751 assert(image.zEXt.keys.length == 0); 1752 1753 assert(image.sPLT.length == 0); 1754 assert(image.hIST.length == 0); 1755 }("tests/png/assets/basn2c08.png", true); 1756 1757 png_test1!q{ 1758 assert(image.checkIDHR(32, 32, 1759 PngIHDRBitDepth.BitDepth16, 1760 PngIHDRColorType.ColorUsed, 1761 PngIHDRCompresion.DeflateInflate, 1762 PngIHDRFilter.Adaptive, 1763 PngIHDRInterlaceMethod.NoInterlace)); 1764 1765 assert(image.PLTE is null); 1766 assert(image.tRNS is null); 1767 assert(image.gAMA !is null); 1768 assert(image.cHRM is null); 1769 assert(image.sRGB is null); 1770 assert(image.iCCP is null); 1771 assert(image.bKGD is null); 1772 assert(image.pPHs is null); 1773 assert(image.sBIT is null); 1774 assert(image.tIME is null); 1775 1776 assert(image.tEXt.keys.length == 0); 1777 assert(image.zEXt.keys.length == 0); 1778 1779 assert(image.sPLT.length == 0); 1780 assert(image.hIST.length == 0); 1781 }("tests/png/assets/basn2c16.png", true); 1782 1783 png_test1!q{ 1784 assert(image.checkIDHR(32, 32, 1785 PngIHDRBitDepth.BitDepth1, 1786 PngIHDRColorType.PalletteWithColorUsed, 1787 PngIHDRCompresion.DeflateInflate, 1788 PngIHDRFilter.Adaptive, 1789 PngIHDRInterlaceMethod.NoInterlace)); 1790 1791 assert(image.PLTE !is null); 1792 assert(image.tRNS is null); 1793 assert(image.gAMA !is null); 1794 assert(image.cHRM is null); 1795 assert(image.sRGB is null); 1796 assert(image.iCCP is null); 1797 assert(image.bKGD is null); 1798 assert(image.pPHs is null); 1799 assert(image.sBIT is null); 1800 assert(image.tIME is null); 1801 1802 assert(image.tEXt.keys.length == 0); 1803 assert(image.zEXt.keys.length == 0); 1804 1805 assert(image.sPLT.length == 0); 1806 assert(image.hIST.length == 0); 1807 }("tests/png/assets/basn3p01.png", true); 1808 1809 png_test1!q{ 1810 assert(image.checkIDHR(32, 32, 1811 PngIHDRBitDepth.BitDepth2, 1812 PngIHDRColorType.PalletteWithColorUsed, 1813 PngIHDRCompresion.DeflateInflate, 1814 PngIHDRFilter.Adaptive, 1815 PngIHDRInterlaceMethod.NoInterlace)); 1816 1817 assert(image.PLTE !is null); 1818 assert(image.tRNS is null); 1819 assert(image.gAMA !is null); 1820 assert(image.cHRM is null); 1821 assert(image.sRGB is null); 1822 assert(image.iCCP is null); 1823 assert(image.bKGD is null); 1824 assert(image.pPHs is null); 1825 assert(image.sBIT !is null); 1826 assert(image.tIME is null); 1827 1828 assert(image.tEXt.keys.length == 0); 1829 assert(image.zEXt.keys.length == 0); 1830 1831 assert(image.sPLT.length == 0); 1832 assert(image.hIST.length == 0); 1833 }("tests/png/assets/basn3p02.png", true); 1834 1835 png_test1!q{ 1836 assert(image.checkIDHR(32, 32, 1837 PngIHDRBitDepth.BitDepth4, 1838 PngIHDRColorType.PalletteWithColorUsed, 1839 PngIHDRCompresion.DeflateInflate, 1840 PngIHDRFilter.Adaptive, 1841 PngIHDRInterlaceMethod.NoInterlace)); 1842 1843 assert(image.PLTE !is null); 1844 assert(image.tRNS is null); 1845 assert(image.gAMA !is null); 1846 assert(image.cHRM is null); 1847 assert(image.sRGB is null); 1848 assert(image.iCCP is null); 1849 assert(image.bKGD is null); 1850 assert(image.pPHs is null); 1851 assert(image.sBIT !is null); 1852 assert(image.tIME is null); 1853 1854 assert(image.tEXt.keys.length == 0); 1855 assert(image.zEXt.keys.length == 0); 1856 1857 assert(image.sPLT.length == 0); 1858 assert(image.hIST.length == 0); 1859 }("tests/png/assets/basn3p04.png", true); 1860 1861 png_test1!q{ 1862 assert(image.checkIDHR(32, 32, 1863 PngIHDRBitDepth.BitDepth8, 1864 PngIHDRColorType.PalletteWithColorUsed, 1865 PngIHDRCompresion.DeflateInflate, 1866 PngIHDRFilter.Adaptive, 1867 PngIHDRInterlaceMethod.NoInterlace)); 1868 1869 assert(image.PLTE !is null); 1870 assert(image.tRNS is null); 1871 assert(image.gAMA !is null); 1872 assert(image.cHRM is null); 1873 assert(image.sRGB is null); 1874 assert(image.iCCP is null); 1875 assert(image.bKGD is null); 1876 assert(image.pPHs is null); 1877 assert(image.sBIT is null); 1878 assert(image.tIME is null); 1879 1880 assert(image.tEXt.keys.length == 0); 1881 assert(image.zEXt.keys.length == 0); 1882 1883 assert(image.sPLT.length == 0); 1884 assert(image.hIST.length == 0); 1885 }("tests/png/assets/basn3p08.png", true); 1886 } 1887 1888 // basi*a** 1889 unittest { 1890 png_test1!q{ 1891 assert(image.checkIDHR(32, 32, 1892 PngIHDRBitDepth.BitDepth8, 1893 PngIHDRColorType.GrayscaleWithAlpha, 1894 PngIHDRCompresion.DeflateInflate, 1895 PngIHDRFilter.Adaptive, 1896 PngIHDRInterlaceMethod.Adam7)); 1897 1898 assert(image.PLTE is null); 1899 assert(image.tRNS is null); 1900 assert(image.gAMA !is null); 1901 assert(image.cHRM is null); 1902 assert(image.sRGB is null); 1903 assert(image.iCCP is null); 1904 assert(image.bKGD is null); 1905 assert(image.pPHs is null); 1906 assert(image.sBIT is null); 1907 assert(image.tIME is null); 1908 1909 assert(image.tEXt.keys.length == 0); 1910 assert(image.zEXt.keys.length == 0); 1911 1912 assert(image.sPLT.length == 0); 1913 assert(image.hIST.length == 0); 1914 }("tests/png/assets/basi4a08.png", true); 1915 1916 png_test1!q{ 1917 assert(image.checkIDHR(32, 32, 1918 PngIHDRBitDepth.BitDepth16, 1919 PngIHDRColorType.GrayscaleWithAlpha, 1920 PngIHDRCompresion.DeflateInflate, 1921 PngIHDRFilter.Adaptive, 1922 PngIHDRInterlaceMethod.Adam7)); 1923 1924 assert(image.PLTE is null); 1925 assert(image.tRNS is null); 1926 assert(image.gAMA !is null); 1927 assert(image.cHRM is null); 1928 assert(image.sRGB is null); 1929 assert(image.iCCP is null); 1930 assert(image.bKGD is null); 1931 assert(image.pPHs is null); 1932 assert(image.sBIT is null); 1933 assert(image.tIME is null); 1934 1935 assert(image.tEXt.keys.length == 0); 1936 assert(image.zEXt.keys.length == 0); 1937 1938 assert(image.sPLT.length == 0); 1939 assert(image.hIST.length == 0); 1940 }("tests/png/assets/basi4a16.png", true); 1941 1942 png_test1!q{ 1943 assert(image.checkIDHR(32, 32, 1944 PngIHDRBitDepth.BitDepth8, 1945 PngIHDRColorType.ColorUsedWithAlpha, 1946 PngIHDRCompresion.DeflateInflate, 1947 PngIHDRFilter.Adaptive, 1948 PngIHDRInterlaceMethod.Adam7)); 1949 1950 assert(image.PLTE is null); 1951 assert(image.tRNS is null); 1952 assert(image.gAMA !is null); 1953 assert(image.cHRM is null); 1954 assert(image.sRGB is null); 1955 assert(image.iCCP is null); 1956 assert(image.bKGD is null); 1957 assert(image.pPHs is null); 1958 assert(image.sBIT is null); 1959 assert(image.tIME is null); 1960 1961 assert(image.tEXt.keys.length == 0); 1962 assert(image.zEXt.keys.length == 0); 1963 1964 assert(image.sPLT.length == 0); 1965 assert(image.hIST.length == 0); 1966 }("tests/png/assets/basi6a08.png", true); 1967 1968 png_test1!q{ 1969 assert(image.checkIDHR(32, 32, 1970 PngIHDRBitDepth.BitDepth16, 1971 PngIHDRColorType.ColorUsedWithAlpha, 1972 PngIHDRCompresion.DeflateInflate, 1973 PngIHDRFilter.Adaptive, 1974 PngIHDRInterlaceMethod.Adam7)); 1975 1976 assert(image.PLTE is null); 1977 assert(image.tRNS is null); 1978 assert(image.gAMA !is null); 1979 assert(image.cHRM is null); 1980 assert(image.sRGB is null); 1981 assert(image.iCCP is null); 1982 assert(image.bKGD is null); 1983 assert(image.pPHs is null); 1984 assert(image.sBIT is null); 1985 assert(image.tIME is null); 1986 1987 assert(image.tEXt.keys.length == 0); 1988 assert(image.zEXt.keys.length == 0); 1989 1990 assert(image.sPLT.length == 0); 1991 assert(image.hIST.length == 0); 1992 }("tests/png/assets/basi6a16.png", true); 1993 } 1994 1995 // basn*a** 1996 unittest { 1997 png_test1!q{ 1998 assert(image.checkIDHR(32, 32, 1999 PngIHDRBitDepth.BitDepth8, 2000 PngIHDRColorType.GrayscaleWithAlpha, 2001 PngIHDRCompresion.DeflateInflate, 2002 PngIHDRFilter.Adaptive, 2003 PngIHDRInterlaceMethod.NoInterlace)); 2004 2005 assert(image.PLTE is null); 2006 assert(image.tRNS is null); 2007 assert(image.gAMA !is null); 2008 assert(image.cHRM is null); 2009 assert(image.sRGB is null); 2010 assert(image.iCCP is null); 2011 assert(image.bKGD is null); 2012 assert(image.pPHs is null); 2013 assert(image.sBIT is null); 2014 assert(image.tIME is null); 2015 2016 assert(image.tEXt.keys.length == 0); 2017 assert(image.zEXt.keys.length == 0); 2018 2019 assert(image.sPLT.length == 0); 2020 assert(image.hIST.length == 0); 2021 }("tests/png/assets/basn4a08.png", true); 2022 2023 png_test1!q{ 2024 assert(image.checkIDHR(32, 32, 2025 PngIHDRBitDepth.BitDepth16, 2026 PngIHDRColorType.GrayscaleWithAlpha, 2027 PngIHDRCompresion.DeflateInflate, 2028 PngIHDRFilter.Adaptive, 2029 PngIHDRInterlaceMethod.NoInterlace)); 2030 2031 assert(image.PLTE is null); 2032 assert(image.tRNS is null); 2033 assert(image.gAMA !is null); 2034 assert(image.cHRM is null); 2035 assert(image.sRGB is null); 2036 assert(image.iCCP is null); 2037 assert(image.bKGD is null); 2038 assert(image.pPHs is null); 2039 assert(image.sBIT is null); 2040 assert(image.tIME is null); 2041 2042 assert(image.tEXt.keys.length == 0); 2043 assert(image.zEXt.keys.length == 0); 2044 2045 assert(image.sPLT.length == 0); 2046 assert(image.hIST.length == 0); 2047 }("tests/png/assets/basn4a16.png", true); 2048 2049 png_test1!q{ 2050 assert(image.checkIDHR(32, 32, 2051 PngIHDRBitDepth.BitDepth8, 2052 PngIHDRColorType.ColorUsedWithAlpha, 2053 PngIHDRCompresion.DeflateInflate, 2054 PngIHDRFilter.Adaptive, 2055 PngIHDRInterlaceMethod.NoInterlace)); 2056 2057 assert(image.PLTE is null); 2058 assert(image.tRNS is null); 2059 assert(image.gAMA !is null); 2060 assert(image.cHRM is null); 2061 assert(image.sRGB is null); 2062 assert(image.iCCP is null); 2063 assert(image.bKGD is null); 2064 assert(image.pPHs is null); 2065 assert(image.sBIT is null); 2066 assert(image.tIME is null); 2067 2068 assert(image.tEXt.keys.length == 0); 2069 assert(image.zEXt.keys.length == 0); 2070 2071 assert(image.sPLT.length == 0); 2072 assert(image.hIST.length == 0); 2073 }("tests/png/assets/basn6a08.png", true); 2074 2075 png_test1!q{ 2076 assert(image.checkIDHR(32, 32, 2077 PngIHDRBitDepth.BitDepth16, 2078 PngIHDRColorType.ColorUsedWithAlpha, 2079 PngIHDRCompresion.DeflateInflate, 2080 PngIHDRFilter.Adaptive, 2081 PngIHDRInterlaceMethod.NoInterlace)); 2082 2083 assert(image.PLTE is null); 2084 assert(image.tRNS is null); 2085 assert(image.gAMA !is null); 2086 assert(image.cHRM is null); 2087 assert(image.sRGB is null); 2088 assert(image.iCCP is null); 2089 assert(image.bKGD is null); 2090 assert(image.pPHs is null); 2091 assert(image.sBIT is null); 2092 assert(image.tIME is null); 2093 2094 assert(image.tEXt.keys.length == 0); 2095 assert(image.zEXt.keys.length == 0); 2096 2097 assert(image.sPLT.length == 0); 2098 assert(image.hIST.length == 0); 2099 }("tests/png/assets/basn6a16.png", true); 2100 } 2101 2102 // z**n2c08 2103 unittest { 2104 png_test1!q{ 2105 assert(image.checkIDHR(32, 32, 2106 PngIHDRBitDepth.BitDepth8, 2107 PngIHDRColorType.ColorUsed, 2108 PngIHDRCompresion.DeflateInflate, 2109 PngIHDRFilter.Adaptive, 2110 PngIHDRInterlaceMethod.NoInterlace)); 2111 2112 assert(image.PLTE is null); 2113 assert(image.tRNS is null); 2114 assert(image.gAMA is null); 2115 assert(image.cHRM is null); 2116 assert(image.sRGB is null); 2117 assert(image.iCCP is null); 2118 assert(image.bKGD is null); 2119 assert(image.pPHs is null); 2120 assert(image.sBIT is null); 2121 assert(image.tIME is null); 2122 2123 assert(image.tEXt.keys.length == 0); 2124 assert(image.zEXt.keys.length == 0); 2125 2126 assert(image.sPLT.length == 0); 2127 assert(image.hIST.length == 0); 2128 }("tests/png/assets/z00n2c08.png", true); 2129 2130 png_test1!q{ 2131 assert(image.checkIDHR(32, 32, 2132 PngIHDRBitDepth.BitDepth8, 2133 PngIHDRColorType.ColorUsed, 2134 PngIHDRCompresion.DeflateInflate, 2135 PngIHDRFilter.Adaptive, 2136 PngIHDRInterlaceMethod.NoInterlace)); 2137 2138 assert(image.PLTE is null); 2139 assert(image.tRNS is null); 2140 assert(image.gAMA is null); 2141 assert(image.cHRM is null); 2142 assert(image.sRGB is null); 2143 assert(image.iCCP is null); 2144 assert(image.bKGD is null); 2145 assert(image.pPHs is null); 2146 assert(image.sBIT is null); 2147 assert(image.tIME is null); 2148 2149 assert(image.tEXt.keys.length == 0); 2150 assert(image.zEXt.keys.length == 0); 2151 2152 assert(image.sPLT.length == 0); 2153 assert(image.hIST.length == 0); 2154 }("tests/png/assets/z03n2c08.png", true); 2155 2156 png_test1!q{ 2157 assert(image.checkIDHR(32, 32, 2158 PngIHDRBitDepth.BitDepth8, 2159 PngIHDRColorType.ColorUsed, 2160 PngIHDRCompresion.DeflateInflate, 2161 PngIHDRFilter.Adaptive, 2162 PngIHDRInterlaceMethod.NoInterlace)); 2163 2164 assert(image.PLTE is null); 2165 assert(image.tRNS is null); 2166 assert(image.gAMA is null); 2167 assert(image.cHRM is null); 2168 assert(image.sRGB is null); 2169 assert(image.iCCP is null); 2170 assert(image.bKGD is null); 2171 assert(image.pPHs is null); 2172 assert(image.sBIT is null); 2173 assert(image.tIME is null); 2174 2175 assert(image.tEXt.keys.length == 0); 2176 assert(image.zEXt.keys.length == 0); 2177 2178 assert(image.sPLT.length == 0); 2179 assert(image.hIST.length == 0); 2180 }("tests/png/assets/z06n2c08.png", true); 2181 2182 png_test1!q{ 2183 assert(image.checkIDHR(32, 32, 2184 PngIHDRBitDepth.BitDepth8, 2185 PngIHDRColorType.ColorUsed, 2186 PngIHDRCompresion.DeflateInflate, 2187 PngIHDRFilter.Adaptive, 2188 PngIHDRInterlaceMethod.NoInterlace)); 2189 2190 assert(image.PLTE is null); 2191 assert(image.tRNS is null); 2192 assert(image.gAMA is null); 2193 assert(image.cHRM is null); 2194 assert(image.sRGB is null); 2195 assert(image.iCCP is null); 2196 assert(image.bKGD is null); 2197 assert(image.pPHs is null); 2198 assert(image.sBIT is null); 2199 assert(image.tIME is null); 2200 2201 assert(image.tEXt.keys.length == 0); 2202 assert(image.zEXt.keys.length == 0); 2203 2204 assert(image.sPLT.length == 0); 2205 assert(image.hIST.length == 0); 2206 }("tests/png/assets/z09n2c08.png", true); 2207 }